<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Giới thiệu sách</title>
<script type="text/javascript">
	$(document).ready(function(){
		var url = "ajax/getRelatedBook?index=${bookInfo.id}&category=${bookInfo.bookTypeId}"
		$('.pr-recommend-list').load(url, function(data){
			console.log(data);
		});
	});
</script>
</head>
<body>
	<div class="list-view">
		<div class="pr-head">
			<span class="pr-detail-name">${bookInfo.name }</span>
		</div>
		<div class="pr-detail">
			<div class="pr-detail-left">
				<div class="pr-detail-img"
					style="background-image: url('getBookImage?bookId=${bookInfo.id}')">
					<div class="pr-detail-info">
						<div class="pr-ranking">
							<span class="pr-star full"></span> <span class="pr-star full"></span>
							<span class="pr-star full"></span> <span class="pr-star half"></span>
						</div>
						<span>(${bookInfo.likeNumber } like)</span> 
						
						<span class="pr-price right" data="${bookInfo.id}"><fmt:formatNumber pattern="###,###.###" value="${bookInfo.price-(bookInfo.price*bookInfo.discount/100)}" />VNĐ</span>
					</div>
				</div>
				<div class="pr-head">
					<span>Các sách cùng thể loại</span>
				</div>
				<ul class="pr-recommend-list" id="list2">

				</ul>

			</div>
			<div class="pr-detail-right">
				<div class="pr-text"> 
					<div class="publisherInfo"> 
						<ul>
							<li><span>Tác giả: </span> ${bookInfo.author }</li>
							<li><span>Nhà xuất bản: </span> ${publisherInfo.name }</li>
							<li><span>Năm xuất bản: </span> <fmt:formatDate pattern="dd/MM/yyyy" value="${bookInfo.datePublish}"/></li>
							<li><span>Tái bản lần thứ: </span> ${bookkInfo.numberRepublish }</li>
						</ul>
					</div>
					<div class="short_desciprtion"><p>${bookInfo.shortDescription }</p></div>
					<div class="long_description"><p>${bookInfo.longDescription }</p></div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>